AC_INIT(README)
AC_CANONICAL_SYSTEM

AM_INIT_AUTOMAKE(wnck-sharp, 0.0.1)

AM_MAINTAINER_MODE

AC_PATH_PROG(MONO, mono, no)
if test "x$MONO" = "xno"; then
	AC_MSG_ERROR([Cannot find "mono" runtime in your PATH])
fi

AC_PATH_PROG(CSC, gmcs, no)
if test "x$CSC" = "xno"; then
	AC_MSG_ERROR([Cannot find "gmcs" compiler in your PATH])
fi
AC_SUBST(CSC)

PKG_CHECK_MODULES(WNCK, libwnck-1.0)

PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-2.0)
AC_SUBST(GTKSHARP_LIBS)
AC_SUBST(GTKSHARP_CFLAGS)

PKG_CHECK_MODULES(GAPI, gapi-2.0 >= 1.9.0)

AC_PATH_PROG(GAPI_CODEGEN, gapi2-codegen, no)
if test "x$GAPI_CODEGEN" = "xno"; then
	AC_MSG_ERROR([Cannot find "gapi2-codegen" compiler in your PATH])
fi
AC_SUBST(GAPI_CODEGEN)

AC_OUTPUT([
	Makefile
	wnck-sharp.pc
	wnck/Makefile
])
